package com.example.demo1107.demo1;

public class Singleton01 {
    private Singleton01(){}
    private static Singleton01 singleton;
    public static Singleton01 getInstance(){
        if (singleton==null){
            singleton = new Singleton01();
        }
        return singleton;
    }
    public void show(){
        System.out.println("-----------show---------");
    }
}
